#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    string tableware[4] = {"bowl","knife","fork","chopsticks"};
    vector<string> out;
    vector<int> num;
    int n;
    while(cin >> n)
    {
        int i = 0,j=0;
        while(i++ < n)
        {
            string box;
            cin >> box;
            if(box == tableware[0] || box == tableware[1] || box == tableware[2] || box == tableware[3])
            {
                if(j>0)
                    cout<<" ";
                cout<<box;
                j++;
            }
        }
        cout<<endl;
    }

    return 0;
}
